package com.eastfair.imaster.service;

import com.eastfair.boot.service.SuperService;
import com.eastfair.core.base.R;
import com.eastfair.imaster.dto.ConferenceSpeakerDTO;
import com.eastfair.imaster.entity.ConferenceSpeaker;
import com.eastfair.imaster.vo.ConferenceSpeakerVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 论坛嘉宾
 * </p>
 *
 * @author zjn
 * @date 2021-08-31
 */
public interface ConferenceSpeakerService extends SuperService<ConferenceSpeaker> {

    /**
     * 新增论坛嘉宾
     *
     * @param conferenceSpeakerDTOList 论坛嘉宾列表
     * @param conferenceId             论坛id
     */
    R<Boolean> saveConferenceSpeakers(List<ConferenceSpeakerDTO> conferenceSpeakerDTOList, Long conferenceId);

    /**
     * 删除论坛嘉宾
     *
     * @param conferenceId 论坛主键
     * @return 是否删除成功
     */
    R<Boolean> deleteByConferenceId(Long conferenceId);

    /**
     * 先删后插论坛嘉宾
     *
     * @param conferenceSpeakerDTOList 论坛嘉宾
     * @param conferenceId             论坛主键
     * @return 是否成功
     */
    R<Boolean> deleteAndSaveConferenceSpeakers(List<ConferenceSpeakerDTO> conferenceSpeakerDTOList, Long conferenceId);

    /**
     * 通过论坛id获取嘉宾
     *
     * @param conferenceId  论坛id
     * @param sortOrderType 排序方式
     * @return 嘉宾列表
     */
    R<List<ConferenceSpeakerVO>> getByConferenceId(Long conferenceId, String sortOrderType);
}
